﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;

namespace SuperMicroWave.Converters
{
    public class ExceptionConverter : IMultiValueConverter
    {
        public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
        {
            double tempV = (double)values[0];
            string name = (string)values[1];

            //if(name == "磁控管温度(℃)" && tempV > 75)
            //{
            //    return true;
            //}
            if(name == "实时温度(℃)" && tempV > 300)
            { 
                return true; 
            }
            return false;
        }

        public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
